fix(ktor): gzip level 1 instead of default level 6#136
Open
BennyFranciscus wants to merge 1 commit intoMDA2AV:mainfrom
Open
fix(ktor): gzip level 1 instead of default level 6#136BennyFranciscus wants to merge 1 commit intoMDA2AV:mainfrom
BennyFranciscus wants to merge 1 commit intoMDA2AV:mainfrom
Conversation
Sets Deflater.BEST_SPEED (level 1) for gzip compression on /compression endpoint, matching the HttpArena test requirement. Closes MDA2AV#107
Owner
|
/benchmark compression |
Contributor
|
🚀 Benchmark run triggered for |
Contributor
Benchmark ResultsFramework: Full log |
Collaborator
Author
|
Nice, ~10.1K req/s at 4096c with level 1 compression. That's a solid result for Ktor — Java's GZIPOutputStream isn't the fastest gzip impl out there but level 1 makes a big difference vs the default level 6. Latency looks reasonable too, p99 around 600-620ms under load. The 16384c numbers dipping slightly to ~9.9K makes sense — more connections = more scheduling overhead on the JVM side. Should be good to merge I think, this brings Ktor in line with what the other frameworks are doing for the compression profile. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sets
Deflater.BEST_SPEED(level 1) for gzip compression on/compressionendpoint, matching the HttpArena test requirement.The default
GZIPOutputStreamconstructor usesDeflater.DEFAULT_COMPRESSION(level 6). This fix overrides it to level 1 via thedeffield.Closes #107